﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="userListFilter.ascx.cs" Inherits="VISS.Web.BackEnd.Modules.User.UserListFilterControl" %>

<%@ Import Namespace="VISS.API.Users" %>

<div id="user-filter">
    <span class="title">Bộ lọc</span>
    <div class="content">
        <div class="filter">
            <select id="optGenderFilter">
            <% if (SelectedGender == EUserGender.Unknown) { %>
                <option value="<%=(byte)EUserGender.Unknown %>" selected="selected">Tất cả</option>
                <option value="<%=(byte)EUserGender.Male %>">Nam</option>
                <option value="<%=(byte)EUserGender.Female %>">Nữ</option>
            <% }
               else if (SelectedGender == EUserGender.Male) { %>
                <option value="<%=(byte)EUserGender.Unknown %>">Tất cả</option>
                <option value="<%=(byte)EUserGender.Male %>" selected="selected">Nam</option>
                <option value="<%=(byte)EUserGender.Female %>">Nữ</option>
            <% }
               else { %>
               <option value="<%=(byte)EUserGender.Unknown %>">Tất cả</option>
                <option value="<%=(byte)EUserGender.Male %>">Nam</option>
                <option value="<%=(byte)EUserGender.Female %>" selected="selected">Nữ</option>
            <% } %>
            </select>
        </div>
        <div class="filter">
            <select id="optStatusFilter">
            <% if (SelectedStatus == EUserStatus.Unknown) { %>
                <option value="<%=(int)EUserStatus.Unknown %>" selected="selected">Tất cả</option>
                <option value="<%=(int)EUserStatus.NotActived %>">Chưa Kích hoạt</option>
                <option value="<%=(int)EUserStatus.Actived %>">Đã Kích hoạt</option>
                <option value="<%=-(int)EUserStatus.Verified %>">Chưa Duyệt</option>
                <option value="<%=(int)EUserStatus.Verified %>">Đã Duyệt</option>
                <option value="<%=(int)EUserStatus.Disabled %>">Bị khóa</option>
            <% }
               else if (SelectedStatus == EUserStatus.NotActived) { %>
                <option value="<%=(int)EUserStatus.Unknown %>">Tất cả</option>
                <option value="<%=(int)EUserStatus.NotActived %>" selected="selected">Chưa Kích hoạt</option>
                <option value="<%=(int)EUserStatus.Actived %>">Đã Kích hoạt</option>
                <option value="<%=-(int)EUserStatus.Verified %>">Chưa Duyệt</option>
                <option value="<%=(int)EUserStatus.Deleted %>">Đã Duyệt</option>
                <option value="<%=(int)EUserStatus.Verified %>">Bị khóa</option>
            <% }
               else if (SelectedStatus == EUserStatus.Actived) { %>
                <option value="<%=(int)EUserStatus.Unknown %>">Tất cả</option>
                <option value="<%=(int)EUserStatus.NotActived %>">Chưa Kích hoạt</option>
                <option value="<%=(int)EUserStatus.Actived %>" selected="selected">Đã Kích hoạt</option>
                <option value="<%=-(int)EUserStatus.Verified %>">Chưa Duyệt</option>
                <option value="<%=(int)EUserStatus.Verified %>">Đã Duyệt</option>
                <option value="<%=(int)EUserStatus.Disabled %>">Bị khóa</option>
            <% }
               else if ((int)SelectedStatus == -(int)(EUserStatus.Verified)) { %>
                <option value="<%=(int)EUserStatus.Unknown %>">Tất cả</option>
                <option value="<%=(int)EUserStatus.NotActived %>">Chưa Kích hoạt</option>
                <option value="<%=(int)EUserStatus.Actived %>">Đã Kích hoạt</option>
                <option value="<%=-(int)EUserStatus.Verified %>" selected="selected">Chưa Duyệt</option>
                <option value="<%=(int)EUserStatus.Verified %>">Đã Duyệt</option>
                <option value="<%=(int)EUserStatus.Disabled %>">Bị khóa</option>
            <% }
               else if ((SelectedStatus & EUserStatus.Verified) == EUserStatus.Verified) { %>
                <option value="<%=(int)EUserStatus.Unknown %>">Tất cả</option>
                <option value="<%=(int)EUserStatus.NotActived %>">Chưa Kích hoạt</option>
                <option value="<%=(int)EUserStatus.Actived %>">Đã Kích hoạt</option>
                <option value="<%=-(int)EUserStatus.Verified %>">Chưa Duyệt</option>
                <option value="<%=(int)EUserStatus.Verified %>" selected="selected">Đã Duyệt</option>
                <option value="<%=(int)EUserStatus.Disabled %>">Bị khóa</option>
            <% }
               else if ((SelectedStatus & EUserStatus.Disabled) == EUserStatus.Disabled) { %>
                <option value="<%=(int)EUserStatus.Unknown %>">Tất cả</option>
                <option value="<%=(int)EUserStatus.NotActived %>">Chưa Kích hoạt</option>
                <option value="<%=-(int)EUserStatus.Verified %>">Chưa Duyệt</option>
                <option value="<%=(int)EUserStatus.Verified %>">Đã Duyệt</option>
                <option value="<%=(int)EUserStatus.Disabled %>" selected="selected">Bị khóa</option>
            <% }
               else if ((SelectedStatus & EUserStatus.Verified) != EUserStatus.Verified) { %>
                <option value="<%=(int)EUserStatus.Unknown %>">Tất cả</option>
                <option value="<%=(int)EUserStatus.NotActived %>">Chưa Kích hoạt</option>
                <option value="<%=(int)EUserStatus.Actived %>">Đã Kích hoạt</option>
                <option value="<%=-(int)EUserStatus.Verified %>" selected="selected">Chưa Duyệt</option>
                <option value="<%=(int)EUserStatus.Verified %>">Đã Duyệt</option>
                <option value="<%=(int)EUserStatus.Disabled %>">Bị khóa</option>
            <% } %>
            </select>
        </div>
        <div class="filter">
            <input type="checkbox" id="chkHaveAvatar" <% if (HaveAvatar) { Response.Write("checked='checked'"); } %> />
            <label for="chkHaveAvatar">Chỉ những user có avatar</label>
        </div>
        <div class="submit">
            <input type="button" id="btnFilter" value="Lọc" />
        </div>
    </div>
</div>